<div class="widgets leaderboard">
    <div class="row">

        <!--todo 隐藏搜索功能-->
        <div class="col-md-12 boardcontent" style="display:none;">
            <div class="col-md-4 col-sm-4 leaderboardsearch"></div>
            <div class="col-sm-1 col-md-1 addlead">
                <label class="datealignment">
                    From:
                </label>
            </div>
            <div class="col-sm-2 col-md-2 calendar">

                <my-date-picker [options]="myDatePickerOptions" [selDate]="fromDate" (dateChanged)="onFromDateChanged($event)"></my-date-picker>
            </div>
            <div class="col-sm-1 col-md-1 checkdate">
                <label class="todates">
                    To:
                </label>
            </div>
            <div class="col-sm-2 col-md-2 calendar">

                <my-date-picker [options]="myDatePickerOptions" [selDate]="toDate" (dateChanged)="onToDateChanged($event)"></my-date-picker>
            </div>
            <div class="col-sm-2 col-md-2 searchbutton">
                <button [disabled]="submitted" class="btn btn-default btn-auth postbuttons" type="button" (click)="getleaderBoardStas()">Search
                </button>
            </div>

        </div>
        <div class="col-lg-12 col-md-12">
        </div>
        <div class="col-lg-12 col-md-12">
            <ba-card baCardClass="with-scroll table-panel cardHeights">
                <table class="table table-striped">
                    <thead>
                        <tr>
                            <th class="textBold">User Name</th>
                            <th class="textBold">Ideas</th>
                            <th class="textBold">Comments</th>
                            <th class="textBold">Votes</th>
                        </tr>
                    </thead>
                    <tbody>
                        <tr *ngFor="let item of leaderBoardStats">
                            <td class="userName tablealignment" (click)="viewProfile(item._id); Modal.open()">{{ item.name }}
                            </td>
                            <td class="tablealignment">{{ item.totalIdeas }}<i class="ion-ios-lightbulb leaderboard-bulb"></i></td>
                            <td class="tablealignment">{{ item.totalComments }}<i class="ion-chatboxes chatbox"></i></td>
                            <td class="tablealignment">{{ item.totalVotes }}<i class="ion-ios-timer chatbox"></i></td>
                        </tr>
                        <tr *ngIf="tableValue">
                            <td class="tablealignment"></td>
                            <td class="tablealignment newTable">No User Found.</td>
                            <td class="tablealignment"></td>
                            <td class="tablealignment"></td>
                        </tr>
                    </tbody>
                </table>
            </ba-card>
        </div>
    </div>

</div>
<div class="userProfileModel">
    <modal #Modal>
        <modal-header>
            <userprofile></userprofile>
        </modal-header>
    </modal>
</div>